<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/12/19 0019
 * Time: 09:29
 */

namespace app\api\controller;

use think\Controller;
use think\View;
use think\Db;

class Casea extends Controller
{
    //列表展示
    public function index()
    {

        $contact =Db('casea')->field('title,pic')->select();
        if($contact)
        {
            $data = array('code'=>200,'msg'=>'success',$contact);
            return json_encode($data);
        }
        else
        {
            $data = ['code'=>400,'msg'=>'field'];
            return json_encode($data,TRUE);

        }


    }

}